# -*- coding: utf-8 -*-#
#-------------------------------------------------------------------------------
# 建立者:        黄周云  
# Name:         test14_3
# Description: 例14.3
# Author:       ASUS
# Date:         2019/4/17
#-------------------------------------------------------------------------------


import xmltodict
f = open('files/products.xml','rt',encoding='utf-8')
xml = f.read()
#解析xml字符串，并转换为字典
d = xmltodict.parse(xml)
print(d)
f.close()

